package com.zhijian.wharf.dao;

import com.zhijian.wharf.entity.po.ApiLog;
import com.zhijian.wharf.entity.vo.request.ApiLogSearchVo;
import com.zhijian.wharf.entity.vo.response.ApiLogVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ApiLogMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ApiLog record);

    int insertSelective(ApiLog record);

    ApiLog selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ApiLog record);

    int updateByPrimaryKey(ApiLog record);

    /**
     * 查询总数
     *
     * @param apiLogSearchVo
     * @return
     */
    int count(ApiLogSearchVo apiLogSearchVo);

    /**
     * 查询列表
     *
     * @param apiLogSearchVo
     * @return
     */
    List<ApiLogVo> selectList(ApiLogSearchVo apiLogSearchVo);

    /**
     * 查询单个
     *
     * @param apiLogSearchVo
     * @return
     */
    ApiLogVo selectOne(ApiLogSearchVo apiLogSearchVo);

    /**
     * 根据ID查询vo
     *
     * @param id
     * @return
     */
    ApiLogVo selectVoById(Long id);

    /**
     * 批量删除
     *
     * @param idList
     * @return
     */
    void deleteByIdList(@Param("idList") List<Long> idList);

    /**
     * 动态删除
     *
     * @param apiLogSearchVo
     * @return
     */
    void deleteByCondition(ApiLogSearchVo apiLogSearchVo);

    /**
     * 批量新增
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("entities") List<ApiLog> entities);

    /**
     * 根据CreateUserId查询列表
     *
     * @param createUserId
     * @return
     */
    List<ApiLogVo> selectListByCreateUserId(Long createUserId);
}